﻿//======================================================
//==     (c)2008 aspxcms inc by NeTCMS v1.0              ==
//==          Forum:bbs.aspxcms.com                   ==
//==         Website:www.aspxcms.com                  ==
//======================================================
using System;
using System.Collections.Generic;
using System.Text;
using System.Data;
using NetCMS.DALFactory;
using NetCMS.Model;

namespace NetCMS.Content
{
    public class Constr
    {
        private IConstr dal;
        public Constr()
        {
            dal = NetCMS.DALFactory.DataAccess.CreateConstr();
        }
        #region 前台
        public int Add(STConstr Con)
        {
            return dal.Add(Con);
        }
        public int Update(STConstr Con, string ConIDs)
        {
            return dal.Update(Con, ConIDs);
        }
        public int sel_ConstrNum(string UserNum,int flag)
        {
            return dal.sel_ConstrNum(UserNum,flag);
        }
        public DataTable sel_ConstrInfo(string UserNum,int flag)
        {
            return dal.sel_ConstrInfo(UserNum, flag);
        }
        public string sel_conStr(string u_ClassID)
        {
            return dal.sel_conStr(u_ClassID);
            
        }
        public int del_conStrInfo(string ID,int flag)
        {
            return dal.del_conStrInfo(ID,flag);
        }
        public int sel_conStrCount(string UserNum,int flag)
        {
            return dal.sel_conStrCount(UserNum, flag);
        }
        public int add_sysUserOther(STuserother Con, string UserNum)
        {
            return dal.add_sysUserOther(Con, UserNum);
        }
        public int update_sysUserOther(STuserother Con, string ConIDs)
        {
            return dal.update_sysUserOther(Con, ConIDs);
        }
        public string ConstrTF()
        {
            return dal.ConstrTF();
        }
        #region ConstrClass_add.aspx
        public DataTable sel_userConstr(int flag)
        {
            return dal.sel_userConstr(flag);
        }
        public int add_conStrClass(STConstrClass Con, string Ccid, string UserNum)
        {
            return dal.add_conStrClass(Con, Ccid, UserNum);
        }
        #endregion

        #region ConstrClass_up.aspx
        public int update_conStrClass(STConstrClass Con, string Ccid)
        {
            return dal.update_conStrClass(Con, Ccid);
        }
        #endregion

        #region Constrlist.aspx
        public int update_UserInfos(string tagsd, string ID,int flag)
        {
            return dal.update_UserInfos(tagsd, ID,flag);
        }
        public DataTable GetPage(string UserNum, string ClassID, int PageIndex, int PageSize, out int RecordCount, out int PageCount, params SQLConditionInfo[] SqlCondition)
        {
            return dal.GetPage(UserNum, ClassID, PageIndex, PageSize, out RecordCount, out PageCount, SqlCondition);
        }
        public DataTable sel_getUserConStr(int PageIndex, int PageSize, out int RecordCount, out int PageCount, params SQLConditionInfo[] SqlCondition)
        {
            return dal.sel_getUserConStr(PageIndex, PageSize, out RecordCount, out PageCount, SqlCondition);
        }
        #endregion

        #endregion

        #region 后台

        #region Constr_chicklist.aspx
        public int update_conStrInfo(string ID,int flag)
        {
            return dal.update_conStrInfo(ID,flag);
        }
        #endregion

        #region Constr_Edit.aspx
        public int add_conStrEdit(string NewsID, string NewsTitle, string PicURL, string ClassID, string Author, string Editor, string Souce, string Content, string CreatTime, string SiteID, string Tags, string DataLib, string NewsTemplet, string strSavePath, string strfileName, string strfileexName, string strCheckInt)
        {
            return dal.add_conStrEdit(NewsID, NewsTitle, PicURL, ClassID, Author, Editor, Souce, Content, CreatTime, SiteID, Tags, DataLib, NewsTemplet, strSavePath, strfileName, strfileexName, strCheckInt);
        }
        public int add_userGhistory(string NewsID, int gPoint, int iPoint, int Money1, DateTime CreatTime1, string UserNum, string content4)
        {
            return dal.add_userGhistory(NewsID, gPoint, iPoint, Money1, CreatTime1, UserNum, content4);
        }
        public int update_sysUser(int iPoint2, int gPoint2, Decimal Money3, int cPoint2, int aPoint2, string UserNum)
        {
            return dal.update_sysUser(iPoint2, gPoint2, Money3, cPoint2, aPoint2, UserNum);
        }
        public string sel_newsClass(string ClassID)
        {
            return dal.sel_newsClass(ClassID);
        }

        public void updateConstrStrat(string ConID)
        {
            dal.updateConstrStrat(ConID);
        }
        #endregion

        #region Constr_Pay.aspx
        public int add_userConstrPay(string UserNum1, int ParmConstrNums, DateTime payTime, string constrPayID)
        {
            return dal.add_userConstrPay(UserNum1, ParmConstrNums, payTime, constrPayID);
        }
        #endregion

        #region Constr_SetParam.aspx
        public int add_sysParmConstr(string PCId, string ConstrPayName, string gpoint, string ipoint, int moneys1, string Gunit)
        {
            return dal.add_sysParmConstr(PCId, ConstrPayName, gpoint, ipoint, moneys1, Gunit);
        }
        #endregion

        #region Constr_SetParamup.aspx
        public int update_sysParmConstr(string ConstrPayName, string gpoint, string ipoint, int moneys1, string Gunit, string PCIdup)
        {
            return dal.update_sysParmConstr(ConstrPayName, gpoint, ipoint, moneys1, Gunit, PCIdup);
        }
        #endregion

        #region Constr_Stat.aspx
        public int sel_userConstrCount(string UserNum, int m1)
        {
            return dal.sel_userConstrCount(UserNum, m1);
        }
        #endregion
        #endregion
    }
}
